<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<META name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org">
<TITLE>Directives</TITLE>
<META name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79">
<LINK rel="HOME" title="Abyss Web Server For Windows User's Guide" href="index.html">
<LINK rel="UP" title="eXtended Server Side Includes" href="ssi.html">
<LINK rel="PREVIOUS" title="Attribute Values" href="ssistrexpansion.html">
<LINK rel="NEXT" title="Conditional blocks" href="ssiconditional.html">
<LINK rel="STYLESHEET" type="text/css" href="stylesheet.css">
<META name="AppleIcon" content="icon.png">
<META name="AppleTitle" content="Directives">
<META name="Description" content="Directives">
<META name="AppleOrder" content="">
</HEAD>
<BODY class="SECT1" bgcolor="#FFFFFF" text="#000000">
<DIV class="NAVHEADER">
<TABLE summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<TR>
<TH colspan="3" align="center">Abyss Web Server For Windows User's Guide</TH>
</TR>
<TR>
<TD width="10%" align="left" valign="bottom"><A href="ssistrexpansion.html" accesskey="P">Prev</A></TD>
<TD width="80%" align="center" valign="bottom">Chapter 7. eXtended Server Side Includes</TD>
<TD width="10%" align="right" valign="bottom"><A href="ssiconditional.html" accesskey="N">Next</A></TD>
</TR>
</TABLE>
<HR align="left" width="100%"></DIV>
<DIV class="SECT1">
<H1 class="SECT1"><A name="DIRECTIVES" id="DIRECTIVES">Directives</A></H1>
<DIV class="SECT2">
<H2 class="SECT2"><A name="AEN2176" id="AEN2176">#config</A></H2>
<P>This directive is used to override the default XSSI settings while processing the XSSI file.</P>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2179" id="AEN2179">Form 1: <KBD class="USERINPUT">&lt;!-- #config errmsg="error message" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#config errmsg</KBD> is used to change the message sent to the client when an XSSI error occurs. By default, XSSI errors are reported in a detailed manner to allow easy debugging.</P>
</DIV>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2184" id="AEN2184">Form 2: <KBD class="USERINPUT">&lt;!-- #config sizefmt="size_format" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#config sizefmt</KBD> controls the way the server displays XSSI file sizes. <KBD class="USERINPUT">size_format</KBD> can have two values:</P>
<UL>
<LI>
<P><KBD class="USERINPUT">ABBREV</KBD>: displays file sizes in kilobytes (KB) or megabytes (MB).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">BYTES</KBD>: displays file sizes in bytes. It is the default.</P>
</LI>
</UL>
</DIV>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2197" id="AEN2197">Form 3: <KBD class="USERINPUT">&lt;!-- #config timefmt="time_format" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#config timefmt</KBD> specifies the format in which XSSI dates are inserted. <KBD class="USERINPUT">time_format</KBD> must contain formatting tokens that are substituted by the corresponding parts of the date. The available tokens are listed below with the description of their substitution:</P>
<UL>
<LI>
<P><KBD class="USERINPUT">%a</KBD>: Abbreviated English name for day of the week.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%A</KBD>: Complete English name for day of the week.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%b</KBD>: Abbreviated English month name.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%B</KBD>: Complete English month name.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%c</KBD>: Date and time representation. It is the equivalent of <KBD class="USERINPUT">%m/%d/%y %H:%M:%S</KBD>.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%d</KBD>: Day of the month (01-31).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%e</KBD>: Day of the month (1-31). If it is a single digit, it is padded with a space.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%H</KBD>: Hour in 24-hour format (00-23).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%I</KBD>: Hour in 12-hour format (01-12).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%j</KBD>: Day of the year as a decimal number (001-366).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%m</KBD>: Month as a decimal number (01-12).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%M</KBD>: Minute as a decimal number (00-59).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%p</KBD>: A.M. or P.M. indicator for 12-hour format.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%S</KBD>: Second as a decimal number (00-59).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%U</KBD>: Week of the year as a number (00-51). Sunday is the first day of the week.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%w</KBD>: Day of the week as a number (0-6). Sunday is the first day of the week.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%W</KBD>: Week of the year as a number (00-51). Monday is the first day of the week.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%x</KBD>: Date representation. It is the equivalent of <KBD class="USERINPUT">%m/%d/%y</KBD>.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%X</KBD>: Time representation. It is the equivalent of <KBD class="USERINPUT">%H:%M:%S</KBD>.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%y</KBD>: Year without the century (00-99).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%Y</KBD>: Year with the century (0000-9999).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%z</KBD> and <KBD class="USERINPUT">%Z</KBD>: Time zone name; empty if unknown.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">%%</KBD>: Percent sign.</P>
</LI>
</UL>
</DIV>
</DIV>
<DIV class="SECT2">
<H2 class="SECT2"><A name="ECHO" id="ECHO">#echo</A></H2>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2279" id="AEN2279">Form: <KBD class="USERINPUT">&lt;!-- #echo var="variable_name" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#echo</KBD> inserts the value of an XSSI environment variable. XSSI environment variables include those set using the <KBD class="USERINPUT">#set</KBD> directive, those available for CGI scripts (see "<A href="cgivars.html">CGI environment variables</A>" in the "<A href="scripting.html">CGI, FastCGI, and ISAPI</A>" chapter), and five special variables:</P>
<UL>
<LI>
<P><KBD class="USERINPUT">DOCUMENT_NAME</KBD>: The name of the processed XSSI file.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">DOCUMENT_URI</KBD>: The virtual path to the current processed file.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">DATE_LOCAL</KBD>: The current local date.</P>
</LI>
<LI>
<P><KBD class="USERINPUT">DATE_GMT</KBD>: The current date expressed in UTC (coordinated universal time, formerly known as Greenwich Mean Time, or GMT).</P>
</LI>
<LI>
<P><KBD class="USERINPUT">LAST_MODIFIED</KBD>: The last modification date of the processed file expressed in UTC (coordinated universal time).</P>
</LI>
</UL>
If <KBD class="USERINPUT">variable_name</KBD> is not a valid XSSI environment variable, the directive is ignored.</DIV>
</DIV>
<DIV class="SECT2">
<H2 class="SECT2"><A name="AEN2304" id="AEN2304">#exec</A></H2>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2306" id="AEN2306">Form 1: <KBD class="USERINPUT">&lt;!-- #exec cgi="cgi_file" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#exec cgi</KBD> executes a script and inserts its output. If <KBD class="USERINPUT">cgi_file</KBD> begins with a <KBD class="USERINPUT">/</KBD>, it is considered as a virtual path and the directive will behave as if it is <KBD class="USERINPUT">&lt;!-- #include virtual="cgi_file" --&gt;</KBD>. If <KBD class="USERINPUT">cgi_file</KBD> does not begin with a <KBD class="USERINPUT">/</KBD>, it is considered as a relative file name and the server will try to locate it inside the directory containing the currently processed XSSI file. If it is found there, <KBD class="USERINPUT">#exec cgi</KBD> will behave as if it is <KBD class="USERINPUT">&lt;!-- #include file="cgi_file" --&gt;</KBD>. Otherwise, <KBD class="USERINPUT">cgi_file</KBD> will be searched inside the virtual paths listed in <B class="GUILABEL">#exec cgi' Search Paths</B> in the <B class="GUILABEL">XSSI Parameters</B> of the current host.</P>
</DIV>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2321" id="AEN2321">Form 2: <KBD class="USERINPUT">&lt;!-- #exec cmd="shell_command" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#exec cmd</KBD> executes a shell command and inserts its output. The shell executable path is found in the system environment variable <KBD class="USERINPUT">COMSPEC</KBD>. If this variable is empty or does not exist, <KBD class="USERINPUT">command.com</KBD> is used as the default shell.</P>
<DIV class="NOTE">
<BLOCKQUOTE class="NOTE">
<P><B>Note:</B> <KBD class="USERINPUT">#exec cmd</KBD> execution must be used with extreme care. If users can edit or modify HTML pages in your web sites (which is the case if you have a forum or a guestbook for instance), you must disable it. In fact, they can include XSSI tags with dangerous <KBD class="USERINPUT">#exec cmd</KBD> directives and remotely invoke them.</P>
</BLOCKQUOTE>
</DIV>
</DIV>
</DIV>
<DIV class="SECT2">
<H2 class="SECT2"><A name="AEN2333" id="AEN2333">#flastmod</A></H2>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2335" id="AEN2335">Form 1: <KBD class="USERINPUT">&lt;!-- #flastmod file="file_name" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#flastmod file</KBD> inserts the last modification date of the file <KBD class="USERINPUT">file_name</KBD>. <KBD class="USERINPUT">file_name</KBD> is a relative path from the directory containing the processed XSSI file. It file can only be in the same directory or in one of its subdirectories.</P>
</DIV>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2342" id="AEN2342">Form 2: <KBD class="USERINPUT">&lt;!-- #flastmod virtual="virt_path" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#flastmod virtual</KBD> inserts the last modification date of the file which virtual path is <KBD class="USERINPUT">virt_path</KBD>.</P>
</DIV>
</DIV>
<DIV class="SECT2">
<H2 class="SECT2"><A name="AEN2348" id="AEN2348">#fsize</A></H2>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2350" id="AEN2350">Form 1: <KBD class="USERINPUT">&lt;!-- #fsize file="file_name" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#fsize file</KBD> inserts the size of the file <KBD class="USERINPUT">file_name</KBD>. <KBD class="USERINPUT">file_name</KBD> is a relative path from the directory containing the processed XSSI file. It can only be in the same directory or in one of its subdirectories.</P>
</DIV>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2357" id="AEN2357">Form 2: <KBD class="USERINPUT">&lt;!-- #fsize virtual="virt_path" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#fsize virtual</KBD> inserts the size of the content resulting from requesting <KBD class="USERINPUT">virt_path</KBD> from the server. If <KBD class="USERINPUT">virt_path</KBD> is a static file, its size will be inserted. If it is a CGI script or a XSSI file, it is evaluated by the server and the size of the resulting output is inserted.</P>
</DIV>
</DIV>
<DIV class="SECT2">
<H2 class="SECT2"><A name="AEN2364" id="AEN2364">#include</A></H2>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2366" id="AEN2366">Form 1: <KBD class="USERINPUT">&lt;!-- #include file="file_name" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#include file</KBD> instructs the web server to insert a file which must contain valid HTML contents. <KBD class="USERINPUT">file_name</KBD> is a relative path from the directory containing the processed XSSI file. The included file can only be in the same directory or in one of its subdirectories.</P>
</DIV>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2372" id="AEN2372">Form 2: <KBD class="USERINPUT">&lt;!-- #include virtual="virt_path" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#include virtual</KBD> inserts the content resulting from requesting <KBD class="USERINPUT">virt_path</KBD> from the server. If <KBD class="USERINPUT">virt_path</KBD> is a static file, its contents will be included "as is". If it is a CGI script or a XSSI file, it is evaluated by the server and the results are inserted. <KBD class="USERINPUT">virt_path</KBD> must contain or generate valid HTML content.</P>
</DIV>
</DIV>
<DIV class="SECT2">
<H2 class="SECT2"><A name="AEN2380" id="AEN2380">#printenv</A></H2>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2382" id="AEN2382">Form: <KBD class="USERINPUT">&lt;!-- #printenv --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#printenv</KBD> outputs the current CGI environment variables. For more information, refer to the "<A href="cgivars.html">CGI environment variables</A>" section.</P>
</DIV>
</DIV>
<DIV class="SECT2">
<H2 class="SECT2"><A name="AEN2388" id="AEN2388">#set</A></H2>
<DIV class="SECT3">
<H3 class="SECT3"><A name="AEN2390" id="AEN2390">Form: <KBD class="USERINPUT">&lt;!-- #set var="variable_name" value="variable_value" --&gt;</KBD></A></H3>
<P><KBD class="USERINPUT">#set</KBD> sets the value of the variable <KBD class="USERINPUT">variable_name</KBD> to <KBD class="USERINPUT">variable_value</KBD>. If no variable called <KBD class="USERINPUT">variable_name</KBD> exists, it is created before being set. <KBD class="USERINPUT">#set</KBD> can be used to change the value of CGI variables or any already declared variable.</P>
</DIV>
</DIV>
</DIV>
<DIV class="NAVFOOTER">
<HR align="left" width="100%">
<TABLE summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<TR>
<TD width="33%" align="left" valign="top"><A href="ssistrexpansion.html" accesskey="P">Prev</A></TD>
<TD width="34%" align="center" valign="top"><A href="index.html" accesskey="H">Home</A></TD>
<TD width="33%" align="right" valign="top"><A href="ssiconditional.html" accesskey="N">Next</A></TD>
</TR>
<TR>
<TD width="33%" align="left" valign="top">Attribute Values</TD>
<TD width="34%" align="center" valign="top"><A href="ssi.html" accesskey="U">Up</A></TD>
<TD width="33%" align="right" valign="top">Conditional blocks</TD>
</TR>
</TABLE>
</DIV>
<DIV class="COPYRIGHT">Copyright &copy; 2001-2009 Aprelium</DIV>
</BODY>
</HTML>
